<template>
	<view class="printMaterial f fd-c ai-c">
		<view class="title">{{detail.title}}</view>
		<image :src="detail.image" class="img"></image>
		<view class="btn">
			<button open-type="contact"  show-message-card="true" :send-message-title="detail.title" :send-message-img="detail.image" :send-message-path="`/pages/share/share?type=1&id=${id}&shareType=friend&database_type=1`">			
				<text>联系客服打印</text>
			</button>
		</view>
	</view>
</template>

<script>
	import {
		databaseInfo
	} from '@/api/index.js'
	export default {
		data() {
			return {
				id:null,
				detail:''
			}
		},
		onLoad(options) {
			this.id=options.id
			this.getDetail()
		},
		methods: {
			async getDetail() {
				const {
					data
				} = await databaseInfo({
					info_id: this.id,
					type: 1
				})
				this.detail=data
				
			},
			handlePrint(){
				// uni.navigateTo({
				// 	url:'/pages/pdf/printReservation'
				// })
			}
		}
	}
</script>

<style scoped lang="scss">
	button {
		background-color: #3b70ff;
		border: none;
		height: 80rpx;
		font-size: 28rpx;
		color: #ffffff;
		text {
			position: relative;
			margin-top: -14rpx;
		}
	}
	
	button::after {
		border: none;
	}
.printMaterial{
	.title{
		font-size: 32rpx;
		font-weight: 800;
		padding-top: 100rpx;
	}
	.img{
		width: 170rpx;
		height: 210rpx;
		margin-top: 48rpx;
	}
	.btn{
		width: 300rpx;
		margin-top: 100rpx;
	}
}
</style>
